Attribute VB_Name = "Module1"
Sub MoveCtrl(frmTest As Form, ctrlTest As Control)
   Dim x As Integer, y As Integer
   X1 = frmTest.ScaleWidth / 2
   Y1 = frmTest.ScaleHeight / 2
   X2 = ctrlTest.Width / 2
   Y2 = ctrlTest.Height / 2
   ctrlTest.Move (X1 - X2), (Y1 - Y2)
   ctrlTest.ZOrder
End Sub
